/*******************************************************************************
 * @project: Java_Reflect
 * @package: com.burns.java.reflect
 * @file: InstantiationObject.java
 * @author: Administrator
 * @created: 2017年5月13日
 * @purpose:
 * 
 * @version: 1.0
 * 
 * Revision History at the end of file.
 * 
 * Copyright 2017 AcconSys All rights reserved.
 ******************************************************************************/

package com.burns.java.reflect;

/**
 * 实例化Class类对象
 * 
 * @author Administrator
 *
 */
public class InstantiationObject {

	public static void main(String[] args) throws ClassNotFoundException {
		Class<?> class1 = null;
		Class<?> class2 = null;
		Class<?> class3 = null;

		// 一般采用这种形式
		class1 = Class.forName("com.burn" + "s.java.reflect.InstantiationObject");
		class2 = new InstantiationObject().getClass();
		class3 = InstantiationObject.class;

		System.out.println("class1类名称：" + class1.getName());
		System.out.println("class2类名称：" + class2.getName());
		System.out.println("class3类名称：" + class3.getName());

		/**
		 * 结果： class1类名称：com.burns.java.reflect.InstantiationObject
		 * class2类名称：com.burns.java.reflect.InstantiationObject
		 * class3类名称：com.burns.java.reflect.InstantiationObject
		 * 
		 */
	}
}

/*******************************************************************************
 * <B>Revision History</B><BR>
 * [type 'revision' and press Alt + / to insert revision block]<BR>
 * 
 * 
 * 
 * Copyright 2017 AcconSys All rights reserved.
 ******************************************************************************/